﻿using SiyinPractice.Domain.Maintenance;
using SiyinPractice.Infrastructure.EntityFramework.EntityConfigurations;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace SiyinPractice.Infrastructure.DataStore.Maintenance.EntityConfigurations
{
    public class AccountPasswordConfigurations : AbstractEntityTypeConfiguration<AccountPassword>
    {
        public override void Configure(EntityTypeBuilder<AccountPassword> builder)
        {
            base.Configure(builder);
            builder.ToTable("sys_account_password");
            builder.Property(x => x.WebsiteUrl).HasColumnName("WebsiteUrl");
            builder.Property(x => x.CurrentState).HasColumnName("CurrentState").HasMaxLength(64);
            builder.Property(x => x.AccountName).HasColumnName("AccountName").HasMaxLength(64);
            builder.Property(x => x.Password).HasColumnName("Password").HasMaxLength(64);
            builder.Property(x => x.Salt).HasColumnName("Salt").HasMaxLength(10);
            builder.Property(x => x.StartTime).HasColumnName("StartTime");
            builder.Property(x => x.EndTime).HasColumnName("EndTime");
            builder.Property(x => x.ReminderTime).HasColumnName("ReminderTime");
            builder.Property(x => x.ReminderType).HasColumnName("ReminderType").HasMaxLength(64);
            builder.Property(x => x.MsgReminderType).HasColumnName("MsgReminderType").HasMaxLength(128);
            builder.Property(x => x.ReminderTemplate).HasColumnName("ReminderTemplate").HasMaxLength(128);
            builder.Property(x => x.IsReminder).HasColumnName("IsReminder");
        }
    }
}